package com.ch.playandroid.activity

import android.app.Application
import com.alibaba.android.arouter.launcher.ARouter
import com.ch.playandroid.BuildConfig
import com.simple.spiderman.SpiderMan

class AppApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        initARouter()
        SpiderMan.init(this)

    }

    private fun initARouter() {
        if (BuildConfig.DEBUG) {
            ARouter.openLog()
            ARouter.openDebug()
        }
        ARouter.init(this)
    }

    override fun onTerminate() {
        super.onTerminate()
        ARouter.getInstance().destroy()
    }
}